/*  			DirectSound
 *
 * Copyright 2010 Chris Robinson
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef EAX_H
#define EAX_H

#include "eax4.h"
#include "eax3.h"


DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties, 0x0306a6a8, 0xb224, 0x11d2, 0x99, 0xe5, 0x00, 0x00, 0xe8, 0xd8, 0xc7, 0x22);
typedef enum {
    DSPROPERTY_EAX20LISTENER_NONE,
    DSPROPERTY_EAX20LISTENER_ALLPARAMETERS,
    DSPROPERTY_EAX20LISTENER_ROOM,
    DSPROPERTY_EAX20LISTENER_ROOMHF,
    DSPROPERTY_EAX20LISTENER_ROOMROLLOFFFACTOR,
    DSPROPERTY_EAX20LISTENER_DECAYTIME,
    DSPROPERTY_EAX20LISTENER_DECAYHFRATIO,
    DSPROPERTY_EAX20LISTENER_REFLECTIONS,
    DSPROPERTY_EAX20LISTENER_REFLECTIONSDELAY,
    DSPROPERTY_EAX20LISTENER_REVERB,
    DSPROPERTY_EAX20LISTENER_REVERBDELAY,
    DSPROPERTY_EAX20LISTENER_ENVIRONMENT,
    DSPROPERTY_EAX20LISTENER_ENVIRONMENTSIZE,
    DSPROPERTY_EAX20LISTENER_ENVIRONMENTDIFFUSION,
    DSPROPERTY_EAX20LISTENER_AIRABSORPTIONHF,
    DSPROPERTY_EAX20LISTENER_FLAGS
} DSPROPERTY_EAX20_LISTENERPROPERTY;

#define DSPROPERTY_EAX20LISTENER_DEFERRED               0x80000000
#define DSPROPERTY_EAX20LISTENER_IMMEDIATE              0x00000000
#define DSPROPERTY_EAX20LISTENER_COMMITDEFERREDSETTINGS 0x00000000

typedef struct _EAX20LISTENERPROPERTIES {
    long lRoom;
    long lRoomHF;
    float flRoomRolloffFactor;
    float flDecayTime;
    float flDecayHFRatio;
    long lReflections;
    float flReflectionsDelay;
    long lReverb;
    float flReverbDelay;
    DWORD dwEnvironment;
    float flEnvironmentSize;
    float flEnvironmentDiffusion;
    float flAirAbsorptionHF;
    DWORD dwFlags;
} EAX20LISTENERPROPERTIES, *LPEAX20LISTENERPROPERTIES;

#define EAX20LISTENERFLAGS_DECAYTIMESCALE        0x00000001
#define EAX20LISTENERFLAGS_REFLECTIONSSCALE      0x00000002
#define EAX20LISTENERFLAGS_REFLECTIONSDELAYSCALE 0x00000004
#define EAX20LISTENERFLAGS_REVERBSCALE           0x00000008
#define EAX20LISTENERFLAGS_REVERBDELAYSCALE      0x00000010
#define EAX20LISTENERFLAGS_DECAYHFLIMIT          0x00000020


DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties, 0x0306a6a7, 0xb224, 0x11d2, 0x99, 0xe5, 0x00, 0x00, 0xe8, 0xd8, 0xc7, 0x22);
typedef enum {
    DSPROPERTY_EAX20BUFFER_NONE,
    DSPROPERTY_EAX20BUFFER_ALLPARAMETERS,
    DSPROPERTY_EAX20BUFFER_DIRECT,
    DSPROPERTY_EAX20BUFFER_DIRECTHF,
    DSPROPERTY_EAX20BUFFER_ROOM,
    DSPROPERTY_EAX20BUFFER_ROOMHF,
    DSPROPERTY_EAX20BUFFER_ROOMROLLOFFFACTOR,
    DSPROPERTY_EAX20BUFFER_OBSTRUCTION,
    DSPROPERTY_EAX20BUFFER_OBSTRUCTIONLFRATIO,
    DSPROPERTY_EAX20BUFFER_OCCLUSION,
    DSPROPERTY_EAX20BUFFER_OCCLUSIONLFRATIO,
    DSPROPERTY_EAX20BUFFER_OCCLUSIONROOMRATIO,
    DSPROPERTY_EAX20BUFFER_OUTSIDEVOLUMEHF,
    DSPROPERTY_EAX20BUFFER_AIRABSORPTIONFACTOR,
    DSPROPERTY_EAX20BUFFER_FLAGS
} DSPROPERTY_EAX20_BUFFERPROPERTY;

#define DSPROPERTY_EAX20BUFFER_DEFERRED               0x80000000
#define DSPROPERTY_EAX20BUFFER_IMMEDIATE              0x00000000
#define DSPROPERTY_EAX20BUFFER_COMMITDEFERREDSETTINGS 0x00000000

typedef struct _EAX20BUFFERPROPERTIES {
    long lDirect;
    long lDirectHF;
    long lRoom;
    long lRoomHF;
    float flRoomRolloffFactor;
    long lObstruction;
    float flObstructionLFRatio;
    long lOcclusion;
    float flOcclusionLFRatio;
    float flOcclusionRoomRatio;
    long lOutsideVolumeHF;
    float flAirAbsorptionFactor;
    DWORD dwFlags;
} EAX20BUFFERPROPERTIES, *LPEAX20BUFFERPROPERTIES;

#define EAX20BUFFERFLAGS_DIRECTHFAUTO 0x00000001
#define EAX20BUFFERFLAGS_ROOMAUTO     0x00000002
#define EAX20BUFFERFLAGS_ROOMHFAUTO   0x00000004


/* EAX 1.0 stuff. */
DEFINE_GUID(DSPROPSETID_EAX10_ListenerProperties, 0x4a4e6fc1, 0xc341, 0x11d1, 0xb7, 0x3a, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
typedef enum {
    DSPROPERTY_EAX10LISTENER_ALL,
    DSPROPERTY_EAX10LISTENER_ENVIRONMENT,
    DSPROPERTY_EAX10LISTENER_VOLUME,
    DSPROPERTY_EAX10LISTENER_DECAYTIME,
    DSPROPERTY_EAX10LISTENER_DAMPING
} DSPROPERTY_EAX10_REVERBPROPERTY;

typedef struct {
    DWORD dwEnvironment;
    float fVolume;
    float fDecayTime;
    float fDamping;
} EAX10LISTENERPROPERTIES;


DEFINE_GUID(DSPROPSETID_EAX10_BufferProperties, 0x4a4e6fc0, 0xc341, 0x11d1, 0xb7, 0x3a, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
typedef enum {
    DSPROPERTY_EAX10BUFFER_ALL,
    DSPROPERTY_EAX10BUFFER_REVERBMIX
} DSPROPERTY_EAX10_BUFFERPROPERTY;

typedef struct {
    float fMix;
} EAX10BUFFERPROPERTIES;

#endif /* EAX_H */
